package com.lbw.Client;


import com.lbw.Client.proxy.ClientProxy;
import com.lbw.common.pojo.User;
import com.lbw.common.service.UserService;

/**
 * @author lbwxxc
 * @date 2025/2/18 17:37
 * @description: TODO
 */
public class TestClient {
    public static void main(String[] args) throws InterruptedException {
        ClientProxy clientProxy=new ClientProxy();
        UserService proxy=clientProxy.getProxy(UserService.class);

        User user = proxy.getUserById(1);
        System.out.println("从服务端得到的user="+user.toString());

        User u=User.builder().id(100).userName("wxx").sex(true).build();
        Integer id = proxy.insertUser(u);
        System.out.println("向服务端插入user的id"+id);
    }
}

